package com.neulogistics.core.substation.domain.model.aggregate;

import cn.hutool.json.JSONObject;
import com.neulogistics.core.substation.domain.model.valueobject.Address;
import com.neulogistics.infrastructure.ddd.domain.seedwork.Entity;
import com.neulogistics.infrastructure.ddd.domain.seedwork.IAggregateRoot;
import lombok.Data;

import java.util.Date;

@Data
public class Substation extends Entity<Integer> implements IAggregateRoot {
    /**
     * 分站id
     */
    private Integer substationId;

    /**
     * 分站名
     */
    private String substationName;

    /**
     * 分站地址{省，市，区，详细，经纬度}
     */
    private Address substationAddress;

    /**
     * 分站库房id
     */
    private Integer subWarehouseId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人id
     */
    private Integer creatorId;

    /**
     * 是否删除
     */
    private Integer deleted;

    public Substation() {
    }

    public Substation(String substationName, Address substationAddress, Integer subWarehouseId) {
        this.substationName = substationName;
        this.substationAddress = substationAddress;
        this.subWarehouseId = subWarehouseId;
        creatorId = 1;
    }
}
